package com.sp2.dev.bean.system;

import com.sp2.dev.dao.system.CostTimeDao;

/**
 * Created by IntelliJ IDEA.
 * User: zhimingli
 * Date: 14-1-26
 * Time: 上午10:22
 * To change this template use File | Settings | File Templates.
 */
public class CostTimeThread extends Thread{

    private CostTime costTime;

    public CostTimeThread(CostTime costTime) {
        this.costTime = costTime;
    }

    @Override
    public void run() {
        try {
           this.inserCostTime(costTime);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
        super.run();
    }
    private void inserCostTime(CostTime costTime){
        CostTimeDao costTimeDao = new CostTimeDao();
        costTimeDao.insert(costTime);
    }
}
